//
//  WHAFHTTPRequest.m
//  Restaurant
//
//  Created by wanghuan on 15/4/27.
//  Copyright (c) 2015年 wanghuan. All rights reserved.
//

#import "WHAFHTTPRequest.h"

@implementation WHAFHTTPRequest

- (void)createWHAFHttpRequestUrl:(NSString *)PathUrl {

    _manager = [[AFHTTPRequestOperationManager alloc]init];
    _manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", nil,@"text/html",@"text/json"];
    
    

    [_manager GET:PathUrl parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
        
        self.Sblock(responseObject);
        
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        
        self.Fblock(error.localizedDescription);
        
    }];

}

@end
